Radxa E52C: add mainline U-Boot support and kernel target configuration#9366
Radxa E52C: add mainline U-Boot support and kernel target configuration#9366Grippy98 merged 2 commits intoarmbian:mainfrom
Conversation
Signed-off-by: okrc <okrc@hexo.dev>
📝 WalkthroughWalkthroughAdds Radxa E52C board support and RK3582 enablement: board config updates including mainline U-Boot helpers, U-Boot RK3582 OTP-driven device-tree fixups, generic RK3588 config changes, and new Radxa E52C device-tree and defconfig files. (49 words) Changes
Sequence DiagramsequenceDiagram
participant UBoot as U-Boot
participant OTP as OTP Hardware
participant FDT as Device Tree
UBoot->>OTP: read CPU code (OTP offset)
OTP-->>UBoot: CPU code
alt CPU code == RK3582
UBoot->>OTP: read ip-state bitmask
OTP-->>UBoot: ip-state bits
UBoot->>UBoot: compute FAIL_* masks & policies
alt cluster(s) disabled
UBoot->>FDT: remove/rename cpu-map clusters
end
alt GPU/codec disabled
UBoot->>FDT: mark gpu@, video-codec@, iommu@ nodes failed/disabled
end
UBoot->>FDT: append "rk3582" to root compatible/soc strings
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
config/boards/radxa-e52c.conf (1)
1-1:⚠️ Potential issue | 🟡 MinorBoard description says "octa core" but RK3582 is a 6-core SoC.
The RK3582 has 2× Cortex-A76 + 4× Cortex-A55 = 6 cores (confirmed by the patch commit message at line 10 of
1000-add-support-for-radxa-e52c.patchand the OTP/policy output showing 2 CPU cores failed from the RK3588's 8). Also, "SoC" appears twice in the description.Proposed fix
-# Rockchip RK3582 SoC octa core 4-16GB SoC eMMC USB3 +# Rockchip RK3582 hexa core 4-16GB SoC eMMC USB3
🧹 Nitpick comments (1)
patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch (1)
161-176:cluster1_removedis set unconditionally — fine in practice, but fragile if the DT structure were ever unexpected.On line 165,
cluster1_removed = trueexecutes regardless of whetherfdt_path_del_nodesucceeded. If the cluster1 node were absent from the DT, this would still trigger the cluster2 → cluster1 rename at line 175, which would also silently fail. Functionally harmless since the RK3588 DT is expected to always have cluster0/1/2, but a guard could prevent a misleading rename attempt.This is a very minor robustness nit on an upstream-authored patch, so no change is necessary.
Optional: guard `cluster1_removed` on success
if ((ip_state[0] & FAIL_CPU_CLUSTER1) == FAIL_CPU_CLUSTER1) { log_debug("remove cpu-map cluster1\n"); - fdt_path_del_node(blob, "/cpus/cpu-map/cluster1"); - cluster1_removed = true; + if (!fdt_path_del_node(blob, "/cpus/cpu-map/cluster1")) + cluster1_removed = true; }
|
I will build images and test this on radxa-e52c board. |
|
Nice. Maybe you could run |
schwar3kat
left a comment
There was a problem hiding this comment.
Tested okay on the board.
|
✅ This PR has been reviewed and approved — all set for merge! |
Signed-off-by: okrc <okrc@hexo.dev>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch`:
- Around line 231-259: The soc_comp construction and FDT calls can silently
truncate or fail; ensure soc_comp is large enough (or dynamically sized) to hold
any "rockchip,rk35..." variant and check snprintf's return value to detect
truncation (referencing soc_comp and cpu_code usage), and check return values
from fdt_setprop_placeholder and both fdt_appendprop_string calls—on any error
log a descriptive message and return a negative error code so the DT cannot be
left in an inconsistent state; also handle failures from
fdt_stringlist_get/fdt_path_offset similarly (references: fdt_path_offset,
fdt_stringlist_get, snprintf, fdt_setprop_placeholder, fdt_appendprop_string).
- Around line 208-229: The code treats a missing CPU DT node as a hard error and
returns the negative node value from ft_system_setup when fdt_subnode_offset
fails; change this to be tolerant: if fdt_subnode_offset(blob, parent,
cpu_node_names[i]) returns < 0, emit a log_debug (or log_info) indicating the
node is absent and continue the loop instead of returning the error, while
keeping the existing fdt_status_fail(blob, node) path for nodes that do exist
and need failing; reference fdt_path_offset, ip_state, cpu_node_names[],
fdt_subnode_offset and fdt_status_fail to locate and update the logic.
patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch
Show resolved
Hide resolved
patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch
Show resolved
Hide resolved
Done. |
Summary by CodeRabbit
New Features
Documentation
Testing by schwar3kat